<%--
  Created by IntelliJ IDEA.
  User: 57998
  Date: 2020/10/17
  Time: 16:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="css/classify_copy.css" />
		<link rel="stylesheet" type="text/css" href="css/classify.css" />
		<script type="text/javascript" src="js/classify.js"></script>
		<title>分类</title>
	</head>
	<body>

		<%@ include file="top.jsp"%>

		<input type="hidden" id="top" value="${top}" />
		<input type="hidden" id="down" value="${down}" />

		<div class="main">
			<div class="container">
				<div class="filters">
					<div class="filter-item">
						<span>分类</span>
						<div class="filter">
							<a href="#" rel="nofollow" id="top_all">全部</a>
							<a href="#" rel="nofollow" id="top_1">喜剧</a>
							<a href="#" rel="nofollow" id="top_2">动作</a>
							<a href="#" rel="nofollow" id="top_3">爱情</a>
							<a href="#" rel="nofollow" id="top_4">惊悚</a>
							<a href="#" rel="nofollow" id="top_5">犯罪</a>
							<a href="#" rel="nofollow" id="top_6">悬疑</a>
							<a href="#" rel="nofollow" id="top_7">战争</a>
							<a href="#" rel="nofollow" id="top_8">科幻</a>
							<a href="#" rel="nofollow" id="top_9">动画</a>
							<a href="#" rel="nofollow" id="top_10">恐怖</a>
							<a href="#" rel="nofollow" id="top_11">家庭</a>
							<a href="#" rel="nofollow" id="top_12">传记</a>
							<a href="#" rel="nofollow" id="top_13">冒险</a>
							<a href="#" rel="nofollow" id="top_14">奇幻</a>
							<a href="#" rel="nofollow" id="top_15">武侠</a>
							<a href="#" rel="nofollow" id="top_16">历史</a>
							<a href="#" rel="nofollow" id="top_17">运动</a>
							<a href="#" rel="nofollow" id="top_18">歌舞</a>
							<a href="#" rel="nofollow" id="top_19">音乐</a>
							<a href="#" rel="nofollow" id="top_20">记录</a>
							<a href="#" rel="nofollow" id="top_21">伦理</a>
							<a href="#" rel="nofollow" id="top_22">西部</a>
							<a href="#" rel="nofollow" id="top_23">其他</a>
						</div>
					</div>
					<div class="filter-item">
						<span>价格</span>
						<div class="filter">
							<a href="#" rel="nofollow" id="down_all">全部</a>
							<a href="#" rel="nofollow" id="down_vip">会员专享</a>
							<a href="#" rel="nofollow" id="down_free">免费观看</a>
						</div>
					</div>
				</div>

				<div id="posts" class="posts grids waterfall clearfix" style="display: flex; flex-wrap: wrap;">
					<c:forEach var="U" items="${films}">
						<div class="post grid" onclick="update_fid1('${U.id}','${U.vedio}','${U.vip_look_temp}')">
							<div class="img">
								<a href="#" title="${U.name}">
									<img src="${U.img}" class="thumb" alt="${U.name}">
								</a></div>
							<div style="color: #333;margin-left: 10px;margin-top: 2%;cursor: pointer;">${U.name}</div>
							<h3 itemprop="name headline"><a itemprop="url" rel="bookmark" href="#" title="">${U.content}</a></h3>
							<div class="grid-meta">
								<span class="price">${U.vip_look_temp}</span>
							</div>
						</div>
					</c:forEach>
				</div>
				<%@ include file="qiantai_page.jsp"%>
			</div>
		</div>

		<script type="text/javascript">
			window.onload = function() {
				if($("#login").val() != "nologin"){
					$("#nologin").hide();
					$("#islogin").show();
				}else{
					$("#nologin").show();
					$("#islogin").hide();
				}
				var gettop = $("#top").val();
				var type_temp = "top_all";
				if (gettop == "0") {
					type_temp = "top_all"
				}else if(gettop == "喜剧") {
					type_temp = "top_1"
				}else if(gettop == "动作") {
					type_temp = "top_2"
				}else if(gettop == "爱情") {
					type_temp = "top_3"
				}else if(gettop == "惊悚") {
					type_temp = "top_4"
				}else if(gettop == "犯罪") {
					type_temp = "top_5"
				}else if(gettop == "悬疑") {
					type_temp = "top_6"
				}else if(gettop == "战争") {
					type_temp = "top_7"
				}else if(gettop == "科幻") {
					type_temp = "top_8"
				}else if(gettop == "动画") {
					type_temp = "top_9"
				}else if(gettop == "恐怖") {
					type_temp = "top_10"
				}else if(gettop == "家庭") {
					type_temp = "top_11"
				}else if(gettop == "传记") {
					type_temp = "top_12"
				}else if(gettop == "冒险") {
					type_temp = "top_13"
				}else if(gettop == "奇幻") {
					type_temp = "top_14"
				}else if(gettop == "武侠") {
					type_temp = "top_15"
				}else if(gettop == "历史") {
					type_temp = "top_16"
				}else if(gettop == "运动") {
					type_temp = "top_17"
				}else if(gettop == "歌舞") {
					type_temp = "top_18"
				}else if(gettop == "音乐") {
					type_temp = "top_19"
				}else if(gettop == "记录") {
					type_temp = "top_20"
				}else if(gettop == "伦理") {
					type_temp = "top_21"
				}else if(gettop == "西部") {
					type_temp = "top_22"
				}else if(gettop == "其他") {
					type_temp = "top_23"
				}
				$("#" + type_temp).addClass("active");
				var down = $("#down").val();
				if(down == "1"){
					$("#down_vip").addClass("active");
				}else if(down == "0"){
					$("#down_free").addClass("active");
				}else{
					$("#down_all").addClass("active");
				}
				$("#top_all").attr("href", "${pageContext.request.contextPath}/classify?type=0&updown=" + down);
				$("#top_1").attr("href", "${pageContext.request.contextPath}/classify?type=喜剧&updown=" + down);
				$("#top_2").attr("href", "${pageContext.request.contextPath}/classify?type=动作&updown=" + down);
				$("#top_3").attr("href", "${pageContext.request.contextPath}/classify?type=爱情&updown=" + down);
				$("#top_4").attr("href", "${pageContext.request.contextPath}/classify?type=惊悚&updown=" + down);
				$("#top_5").attr("href", "${pageContext.request.contextPath}/classify?type=犯罪&updown=" + down);
				$("#top_6").attr("href", "${pageContext.request.contextPath}/classify?type=悬疑&updown=" + down);
				$("#top_7").attr("href", "${pageContext.request.contextPath}/classify?type=战争&updown=" + down);
				$("#top_8").attr("href", "${pageContext.request.contextPath}/classify?type=科幻&updown=" + down);
				$("#top_9").attr("href", "${pageContext.request.contextPath}/classify?type=动画&updown=" + down);
				$("#top_10").attr("href", "${pageContext.request.contextPath}/classify?type=恐怖&updown=" + down);
				$("#top_11").attr("href", "${pageContext.request.contextPath}/classify?type=家庭&updown=" + down);
				$("#top_12").attr("href", "${pageContext.request.contextPath}/classify?type=传记&updown=" + down);
				$("#top_13").attr("href", "${pageContext.request.contextPath}/classify?type=冒险&updown=" + down);
				$("#top_14").attr("href", "${pageContext.request.contextPath}/classify?type=奇幻&updown=" + down);
				$("#top_15").attr("href", "${pageContext.request.contextPath}/classify?type=武侠&updown=" + down);
				$("#top_16").attr("href", "${pageContext.request.contextPath}/classify?type=历史&updown=" + down);
				$("#top_17").attr("href", "${pageContext.request.contextPath}/classify?type=运动&updown=" + down);
				$("#top_18").attr("href", "${pageContext.request.contextPath}/classify?type=歌舞&updown=" + down);
				$("#top_19").attr("href", "${pageContext.request.contextPath}/classify?type=音乐&updown=" + down);
				$("#top_20").attr("href", "${pageContext.request.contextPath}/classify?type=记录&updown=" + down);
				$("#top_21").attr("href", "${pageContext.request.contextPath}/classify?type=伦理&updown=" + down);
				$("#top_22").attr("href", "${pageContext.request.contextPath}/classify?type=西部&updown=" + down);
				$("#top_23").attr("href", "${pageContext.request.contextPath}/classify?type=其他&updown=" + down);
				$("#down_all").attr("href", "${pageContext.request.contextPath}/classify?updown=down_all&type=" + gettop);
				$("#down_vip").attr("href", "${pageContext.request.contextPath}/classify?updown=1&type=" + gettop);
				$("#down_free").attr("href", "${pageContext.request.contextPath}/classify?updown=0&type=" + gettop);
			}
		</script>

	</body>
</html>
